﻿@using MealBooking.Core.Models.Meals;
@model MealCategory
@{
    ViewBag.HeaderTitle = "Meal Category Detail";
    Layout = "../Shared/_Layout.cshtml";
}
<!--Navbar-->
<div data-role="navbar" data-iconpos="left">
    <div class="float-left">
        <div data-role="controlgroup" data-type="horizontal" data-inset="true" data-mini="true">
            <a href="@Url.Action("EditMealCategory", new { id = Model.Id })" data-role="button">
                Edit</a>
            <button data-theme="a">
                Delete</button>
        </div>
    </div>
    @Html.Partial("_FloatRightPartial")
</div>
<!--Navbar End-->
@{
    var mealCategory = Model;
    <ul data-role="listview" data-inset="true" data-mini="true">
        <li data-role="list-divider"></li>
        <li>Name : @mealCategory.Name</li>
        <li>Price : @mealCategory.Price</li>
        @if (mealCategory.DishTemplates != null && mealCategory.DishTemplates.Count != 0)
        {
            <li data-role="list-divider">Dish Categories :<span class="ui-li-count">@mealCategory.DishTemplates.Count</span></li>
            foreach (var dishTemplate in mealCategory.DishTemplates)
            {
            <li><a href="@Url.Action("DishCategoryDetail", "DishManager", new { id = dishTemplate.Category.Id })">
                @dishTemplate.Category.Name [Dish Sum : @dishTemplate.DishSum]</a></li>
            }
        }
        else
        {
            <li>No Categories Yet.</li>
        }
        <li>Description : @mealCategory.Description</li>
    </ul>
}
